home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / gcc_260.zip / gcc_260 / README.IRIX5 < prev    next >
Text File  |  1994-07-12  |  6KB  |  208 lines

  1.  
  2. To enable debugging under Irix 5, you must get GNU as 2.3 and apply the
  3. following patch to it.  Then build and install GNU as.
  4.  
  5. Now configure gcc using the --with-gnu-as option, and build and install
  6. it normally.  Debugging will now work.  It will probably work better with
  7. gdb than with dbx.
  8.  
  9. *** tc-mips.c.orig    Thu May  5 18:22:31 1994
  10. --- tc-mips.c    Mon Jun  6 12:51:08 1994
  11. *************** static char *mips_regmask_frag;
  12. *** 90,95 ****
  13. --- 90,106 ----
  14.   
  15.   const char *mips_target_format = DEFAULT_TARGET_FORMAT;
  16.   
  17. + /* The name of the readonly data section.  */
  18. + #ifdef OBJ_AOUT
  19. + #define RDATA_SECTION_NAME ".data"
  20. + #endif
  21. + #ifdef OBJ_ECOFF
  22. + #define RDATA_SECTION_NAME ".rdata"
  23. + #endif
  24. + #ifdef OBJ_ELF
  25. + #define RDATA_SECTION_NAME ".rodata"
  26. + #endif
  27.   /* These variables are filled in with the masks of registers used.
  28.      The object format code reads them and puts them in the appropriate
  29.      place.  */
  30. *************** macro (ip)
  31. *** 2987,3003 ****
  32.             && offset_expr.X_add_number == 0);
  33.         macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)",
  34.                  treg, (int) BFD_RELOC_MIPS_LITERAL, GP);
  35.       }
  36.         else if (mips_pic == SVR4_PIC
  37.              || mips_pic == EMBEDDED_PIC)
  38.       {
  39.         assert (imm_expr.X_op == O_constant);
  40. !       load_register (&icnt, treg, &imm_expr);
  41.       }
  42.         else
  43. !     abort ();
  44. !       return;
  45.   
  46.       case M_LI_D:
  47.         /* We know that sym is in the .rdata section.  First we get the
  48. --- 2998,3019 ----
  49.             && offset_expr.X_add_number == 0);
  50.         macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)",
  51.                  treg, (int) BFD_RELOC_MIPS_LITERAL, GP);
  52. +       return;
  53.       }
  54.         else if (mips_pic == SVR4_PIC
  55.              || mips_pic == EMBEDDED_PIC)
  56.       {
  57.         assert (imm_expr.X_op == O_constant);
  58. !       load_register (&icnt, AT, &imm_expr);
  59. !       macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
  60. !                "mtc1", "t,G", AT, treg);
  61. !       break;
  62.       }
  63.         else
  64. !     {
  65. !       abort ();
  66. !       return;
  67. !     }
  68.   
  69.       case M_LI_D:
  70.         /* We know that sym is in the .rdata section.  First we get the
  71. *************** macro (ip)
  72. *** 3043,3049 ****
  73.                  treg + 1, (int) BFD_RELOC_LO16, AT);
  74.           }
  75.       }
  76. !            
  77.         break;
  78.   
  79.       case M_LI_DD:
  80. --- 3059,3070 ----
  81.                  treg + 1, (int) BFD_RELOC_LO16, AT);
  82.           }
  83.       }
  84. !       /* To avoid confusion in tc_gen_reloc, we must ensure that this
  85. !      does not become a variant frag.  */
  86. !       frag_wane (frag_now);
  87. !       frag_new (0);
  88.         break;
  89.   
  90.       case M_LI_DD:
  91. *************** macro (ip)
  92. *** 3100,3105 ****
  93. --- 3121,3132 ----
  94.         macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)",
  95.              byte_order == LITTLE_ENDIAN ? treg + 1 : treg,
  96.              (int) r, breg);
  97. +       /* To avoid confusion in tc_gen_reloc, we must ensure that this
  98. +      does not become a variant frag.  */
  99. +       frag_wane (frag_now);
  100. +       frag_new (0);
  101.         if (breg != AT)
  102.       return;
  103.         break;
  104. *************** mips_ip (str, ip)
  105. *** 4478,4487 ****
  106.                 {
  107.                 default: /* unused default case avoids warnings.  */
  108.                 case 'L':
  109. !             newname = (mips_pic != SVR4_PIC ? ".lit8" : ".rdata");
  110.               break;
  111.                 case 'F':
  112. !             newname = ".rdata";
  113.               break;
  114.                 case 'l':
  115.               assert (mips_pic == NO_PIC);
  116. --- 4505,4516 ----
  117.                 {
  118.                 default: /* unused default case avoids warnings.  */
  119.                 case 'L':
  120. !             newname = (mips_pic != SVR4_PIC
  121. !                    ? ".lit8"
  122. !                    : RDATA_SECTION_NAME);
  123.               break;
  124.                 case 'F':
  125. !             newname = RDATA_SECTION_NAME;
  126.               break;
  127.                 case 'l':
  128.               assert (mips_pic == NO_PIC);
  129. *************** mips_ip (str, ip)
  130. *** 4489,4496 ****
  131.               break;
  132.                 }
  133.               new_seg = subseg_new (newname, (subsegT) 0);
  134.   #ifdef OBJ_ELF
  135. !             bfd_set_section_alignment (stdoutput, new_seg, 4);
  136.   #endif
  137.               if (seg == now_seg)
  138.                 as_bad ("Can't use floating point insn in this section");
  139. --- 4518,4528 ----
  140.               break;
  141.                 }
  142.               new_seg = subseg_new (newname, (subsegT) 0);
  143. +             frag_align (*args == 'l' ? 2 : 3, 0);
  144.   #ifdef OBJ_ELF
  145. !             record_alignment (new_seg, 4);
  146. ! #else
  147. !             record_alignment (new_seg, *args == 'l' ? 2 : 3);
  148.   #endif
  149.               if (seg == now_seg)
  150.                 as_bad ("Can't use floating point insn in this section");
  151. *************** s_change_sec (sec)
  152. *** 5478,5490 ****
  153.         break;
  154.   
  155.       case 'r':
  156. ! #ifdef OBJ_ECOFF
  157. !       subseg_new (".rdata", (subsegT) get_absolute_expression ());
  158. !       demand_empty_rest_of_line ();
  159. !       break;
  160. ! #else /* ! defined (OBJ_ECOFF) */
  161.   #ifdef OBJ_ELF
  162. -       seg = subseg_new (".rodata", (subsegT) get_absolute_expression ());
  163.         bfd_set_section_flags (stdoutput, seg,
  164.                    (SEC_ALLOC
  165.                     | SEC_LOAD
  166. --- 5510,5518 ----
  167.         break;
  168.   
  169.       case 'r':
  170. !       seg = subseg_new (RDATA_SECTION_NAME,
  171. !             (subsegT) get_absolute_expression ());
  172.   #ifdef OBJ_ELF
  173.         bfd_set_section_flags (stdoutput, seg,
  174.                    (SEC_ALLOC
  175.                     | SEC_LOAD
  176. *************** s_change_sec (sec)
  177. *** 5492,5504 ****
  178.                     | SEC_RELOC
  179.                     | SEC_DATA));
  180.         bfd_set_section_alignment (stdoutput, seg, 4);
  181.         demand_empty_rest_of_line ();
  182.         break;
  183. - #else /* ! defined (OBJ_ELF) */
  184. -       s_data (0);
  185. -       break;
  186. - #endif /* ! defined (OBJ_ELF) */
  187. - #endif /* ! defined (OBJ_ECOFF) */
  188.   
  189.       case 's':
  190.   #ifdef GPOPT
  191. --- 5520,5528 ----
  192.                     | SEC_RELOC
  193.                     | SEC_DATA));
  194.         bfd_set_section_alignment (stdoutput, seg, 4);
  195. + #endif
  196.         demand_empty_rest_of_line ();
  197.         break;
  198.   
  199.       case 's':
  200.   #ifdef GPOPT
  201.  
  202.